package com.fxb.ut;

import org.junit.jupiter.api.*;

import javax.annotation.processing.SupportedAnnotationTypes;

public class JUnitTestCase {

    @Test
    @Disabled
    public void testSumEqual() {
        // 断言
        Assertions.assertEquals(1, 2);
    }


    public static int num1 = 0;

    @BeforeAll
    public static void init() {
        num1 = 2;
    }

    @Test
    @Disabled
    public void showBeforeAllTest(){
        Assertions.assertEquals(2, num1);
    }


    @BeforeEach
    public void beforeEachTest(){
        System.out.println("执行case:");
    }

    @Test
    @DisplayName("演示BeforeEach - 1")
    public void showBeforeEachTest1(){
        System.out.println("    => case1");
    }


    @Test
    @DisplayName("演示BeforeEach - 2")
    public void showBeforeEachTest2(){
        System.out.println("    => case2");
    }

}
